package com.micro.ai.auth.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.Max;

/**
 * 菜单更新请求
 * 
 * @author micro-ai
 * @since 0.0.1
 */
@Data
@Schema(description = "菜单更新请求")
public class MenuUpdateRequest {

    @Schema(description = "菜单编码")
    private String code;

    @Schema(description = "菜单名称")
    private String name;

    @Schema(description = "菜单描述")
    private String description;

    @Schema(description = "菜单类型", allowableValues = {"directory", "menu", "button"})
    private String type;

    @Schema(description = "路由路径")
    private String path;

    @Schema(description = "组件路径")
    private String component;

    @Schema(description = "重定向路径")
    private String redirect;

    @Schema(description = "图标")
    private String icon;

    @Schema(description = "页面标题")
    private String title;

    @Schema(description = "页面副标题")
    private String subtitle;

    @Schema(description = "父菜单ID")
    private String parentId;

    @Schema(description = "菜单层级")
    @Min(value = 0, message = "菜单层级不能小于0")
    @Max(value = 10, message = "菜单层级不能大于10")
    private Integer level;

    @Schema(description = "排序")
    @Min(value = 0, message = "排序不能小于0")
    private Integer sortOrder;

    @Schema(description = "关联权限编码")
    private String permissionCode;

    @Schema(description = "访问所需权限")
    private String requiredPermission;

    @Schema(description = "状态")
    private String status;

    @Schema(description = "是否可见")
    private Boolean visible;

    @Schema(description = "是否缓存")
    private Boolean cache;

    @Schema(description = "菜单元数据")
    private String meta;
}
